/*
 * lang.js
 * http://dev.akinao.com/
 */
//@require name.js
akinao.namespace('lang');
akinao.lang = {
	isArray:function(v){
		if(v){
			var L=akinao.lang;
			return L.isNumber(v.length)&&L.isFunction(v.splice)&&!L.hasOwnProperty(v.length);
		}
		return false;
	},
	isBoolean:function(v){
		return typeof v==="boolean";
	},
	isFunction:function(v){
		return typeof v==="function";
	},
	isNull:function(v){
		return v===null;
	},
	isNumber:function(v){
		return typeof v==="number"&&isFinite(v);
	},
	isObject:function(v){
		return(v&&(typeof v==="object"||akinao.lang.isFunction(v)))||false;
	},
	isString:function(v){
		return typeof v==="string";
	},
	isUndefined:function(v){
		return typeof v==="undefined";
	},
	hasOwnProperty:function(v,p){
		if(Object.prototype.hasOwnProperty){
			return v.hasOwnProperty(p);
		}
		return !akinao.lang.isUndefined(v[p])&&v.constructor.prototype[p]!==a[p];
	},
	clone:function clone(obj) {
		var F = function(){};
		F.prototype = obj;
		return new F;
	}
}
